******************************************************************************
* Replication file for "The Unintended Side Effect of the GFSN"
*
* Bernhard Reinsberg / Andreas Kern
* Business & Politics (forthcoming)
******************************************************************************

* Annual data
******************************************************************************

  use "CNAML_replication_YLY", clear 
  
  g T=year>1989
  xtset cid year
  sort cid year 
  qui xi:reg lnliabs0 i.cid i.year
  
  global X  lnliabs0 _Iyear*
  global F1  f.dlngdppc f.dlncpi f.reserves_WDI f.crisis_LV  
  global F1X f.dlngdppc f.dlncpi f.reserves_WDI f.crisis_LV  f.lngdppc f.p_polity2 f.v2x_execorr
  global L0  dlngdppc dlncpi reserves_WDI 
  global L0X dlngdppc dlncpi reserves_WDI  lngdppc p_polity2 v2x_execorr
  global L1  l.dlngdppc l.dlncpi l.reserves_WDI 
  global L1X l.dlngdppc l.dlncpi l.reserves_WDI  l.lngdppc l.p_polity2 l.v2x_execorr
  

* Descriptive results using annual TSCS data 
********************************************
  
* Evolution of capital flight 
  
** Figure 1 **
graph box cf if T==1 & cf<=1 & cf>=0, over(year, label(angle(90))) scheme(s1mono) ytitle(Share of capital deposits in OFDs)

  
* Balance tests

preserve
   keep if T==1
   collapse CF IMFnn swap swap_ever crisis_LV crisis_sd HICs growth p_polity v2x_execorr s_unga3 foreign coup_suc, by(cid)
   
   mat M=J(7,4,0)
   
   g CRISIS=crisis_LV>0
   g IMFNN=IMFnn>0
   g SWAP=swap_ev>0
   g POLITY=p_polity2>=6
   g CORR=v2x_exe>=0.55
   g UNGA=s_unga3>-1.86
   g FBANK=foreign>=7
   
   local m=1
   foreach x in CRISIS IMFNN SWAP POLITY CORR UNGA FBANK{
   qui ttest CF, by(`x') une
   mat M[`m',1]=`r(mu_2)'
   mat M[`m',2]=`r(mu_1)'
   mat M[`m',3]=`r(mu_2)'-`r(mu_1)'
   mat M[`m',4]=`r(p)'
   local m=`m'+1
   }
   
** Table 1 ** 
mat li M

restore 
  
  
* Panel results using annual TSCS data 
**************************************
  
* IMF-only result

  qui areg CF FIMFnn if T, a(cid) cl(cid)
  est store a11
  qui areg CF FIMFnn $X $L0 if T, a(cid) cl(cid)
  est store a12
  qui areg CF FIMFnn $X $L0X if T, a(cid) cl(cid)
  est store a13
  
** Table 2 **
estout a1*, drop(_*) starlevels(° .1 * .05 ** .01 *** .001) cells((b(star fmt(3)) se(par fmt(3)))) stats(N N_clust r2_a, fmt(0 0 3)) 

  
* Swaps-only result

  qui areg CF l.swap_ev if T, a(cid) cl(cid)
  est store a21
  qui areg CF l.swap_ev $X $L0 if T, a(cid) cl(cid)
  est store a22
  qui areg CF l.swap_ev $X $L0X if T, a(cid) cl(cid)
  est store a23
  
** Table 3 **  
estout a2*, drop(_* ) starlevels(° .1 * .05 ** .01 *** .001) cells((b(star fmt(3)) se(par fmt(3)))) stats(N N_clust r2_a, fmt(0 0 3)) 
  
  
* Both instruments combined
	
  qui areg CF l.swap_ev FIMFnn if T, a(cid) cl(cid)
  est store a31
  qui areg CF l.swap_ev FIMFnn $X $L0 if T, a(cid) cl(cid)
  est store a32
  qui areg CF l.swap_ev FIMFnn $X $L0X if T, a(cid) cl(cid)
  est store a33
  
** Table 4 **  
estout a3*, drop(_* ) starlevels(° .1 * .05 ** .01 *** .001) cells((b(star fmt(3)) se(par fmt(3)))) stats(N N_clust r2_a, fmt(0 0 3)) 
  

* Unanticipated IMF programs
  
  tab IMFnn imfemf
  g imfnn=IMFnn
  replace imfnn=0 if imfemf==1
  
  qui areg CF f.imfnn f.imfemf if T, a(cid) cl(cid)
  est store a41
  qui areg CF f.imfnn f.imfemf $X $L0 if T, a(cid) cl(cid)
  est store a42
  qui areg CF f.imfnn f.imfemf $X $L0X if T, a(cid) cl(cid)
  est store a43
  
** Table 5 **  
estout a4*, drop(_* ) starlevels(° .1 * .05 ** .01 *** .001) cells((b(star fmt(3)) se(par fmt(3)))) stats(N N_clust r2_a, fmt(0 0 3)) 
    

* Robustness checks: annual analysis
************************************
  
* Descriptives 

  qui estpost su CF IMFnn imfnn imfemf swap_ever lnliabs0 dlngdppc dlncpi reserves_WDI crisis_LV lngdppc v2x_execor p_polity HIC if T==1

** Table A1 **  
esttab ., cells("count mean sd min max") noobs
  

* Controls at both time periods

  qui areg CF l.swap_ever FIMFnn $X if T==1, a(cid) cl(cid)
  est store r11
  qui areg CF l.swap_ever FIMFnn $X $L1 $F1 if T==1, a(cid) cl(cid)
  est store r12
  qui areg CF l.swap_ever FIMFnn $X $L1X $F1X if T==1, a(cid) cl(cid)
  est store r13
  
** Table A2 **
estout r1*, drop(_*) starlevels(° .1 * .05 ** .01 *** .001) cells((b(star fmt(3)) se(par fmt(3)))) stats(N N_clust r2_a, fmt(0 0 3)) 


* Additional control variables

  g bkcrisis0=max(0, crisis_bk)
  qui areg CF FIMFnn l.swap_ever irr_fx $X $L0 if T, a(cid) cl(cid)
  est store r21 
  qui areg CF FIMFnn l.swap_ever bkcrisis0 $X $L0 if T, a(cid) cl(cid) 
  est store r22
  qui areg CF FIMFnn l.swap_ever ka $X $L0 if T, a(cid) cl(cid)
  est store r23

** Table A3 **
estout r2*, drop(_* ) starlevels(° .1 * .05 ** .01 *** .001) cells((b(star fmt(3)) se(par fmt(3)))) stats(N N_clust r2_a, fmt(0 0 3)) 
 

* Exclude HICs 

  qui areg CF l.swap_ever FIMFnn $X if HICs==0 & T==1, a(cid) cl(cid)
  est store r31
  qui areg CF l.swap_ever FIMFnn $X $L1 $F1 if HICs==0 & T==1, a(cid) cl(cid)
  est store r32
  qui areg CF l.swap_ever FIMFnn $X $L1X $F1X if HICs==0 & T==1, a(cid) cl(cid)
  est store r33
  
** Table A4 **
estout r3*, drop(_*) starlevels(° .1 * .05 ** .01 *** .001) cells((b(star fmt(3)) se(par fmt(3)))) stats(N N_clust r2_a, fmt(0 0 3)) 


* Alternative measures of tax havens
 
  qui areg CFc  FIMF l.swap_ev $X $L0X if T, a(cid) cl(cid)
  est store r41
  qui areg CF_AND  FIMF l.swap_ev $X $L0X if T, a(cid) cl(cid)
  est store r42
  qui areg CF_DAM  FIMF l.swap_ev $X $L0X if T, a(cid) cl(cid)
  est store r43
  qui areg CF_GB  FIMF l.swap_ev $X $L0X if T, a(cid) cl(cid)
  est store r44
  qui areg cfus  FIMF l.swap_ev $X $L0X if T, a(cid) cl(cid)
  est store r45
  
** Table A5 **
estout r4*, drop(_* ) starlevels(° .1 * .05 ** .01 *** .001) cells((b(star fmt(3)) se(par fmt(3)))) stats(N N_clust r2_a, fmt(0 0 3)) 


* OFD flows do not predict crises

  qui areg crisis_LV l.CF $X if T==1, a(cid) cl(cid)  
  est store r51
  qui areg crisis_LV l.CF $L0 $X if T==1, a(cid) cl(cid)  
  est store r52
  qui areg crisis_LV l.CF $L0X $X if T==1, a(cid) cl(cid)  
  est store r53
  
** Table A6 **
estout r5*, drop(_*) starlevels(° .1 * .05 ** .01 *** .001) cells((b(star fmt(3)) se(par fmt(3)))) stats(N N_clust r2_a, fmt(0 0 3))
    

* TWFE assumptions

  ** Focal variable: IMF program
  fect cf, treat(FIMFnn) unit(cid) time(year) cov(lnliabs0) method("fe") nboots(20) tol(5e-4) se offperiod(4) preperiod(-7)
  fect cf, treat(FIMFnn) unit(cid) time(year) cov(lnliabs0 swap swap_ever) method("fe") nboots(50) tol(1e-4) se offperiod(4) preperiod(-7)
  
  ** Focal variable: PBoC swaps 
  fect cf, treat(swap_ever) unit(cid) time(year) cov(lnliabs0) method("fe") nboots(20) tol(5e-4) se preperiod(-7) offperiod(4)
  fect cf, treat(swap_ever) unit(cid) time(year) cov(lnliabs0 IMFnn FIMFnn) method("fe") nboots(20) tol(5e-4) se preperiod(-7) offperiod(4)
  
   
* IV design: IMF programs

  g iv1=nUnder*imfav
  mat F=J(3,3,0)
  qui cmp (CF=FIMFnn $X _Icid*) (FIMFnn=iv1 imfav nUnder $X _Icid*), indicators(T 1) ro cl(cid) iterate(30)
    est store r61
    mat F[1,1]=e(N1)
    qui test [FIMFnn]iv1
    mat F[2,1]=r(chi2)
    qui areg CF FIMFnn $X if T, a(cid) 
    mat F[3,1]=e(r2_a)
  qui cmp (CF=FIMFnn $L0 $X _Icid*) (FIMFnn=iv1 imfav nUnder $L0 $X _Icid*), indicators(T 1) ro cl(cid) iterate(30)
    est store r62
    mat F[1,2]=e(N1)
    qui test [FIMFnn]iv1
    mat F[2,2]=r(chi2)
    qui areg CF FIMFnn $L0 $X if T, a(cid) 
    mat F[3,2]=e(r2_a)
  qui cmp (CF=FIMFnn $L0X $X _Icid*) (FIMFnn=iv1 imfav nUnder $L0X $X _Icid*), indicators(T 1) ro cl(cid) iterate(30)
    est store r63
	mat F[1,3]=e(N1)
    qui test [FIMFnn]iv1
    mat F[2,3]=r(chi2)
    qui areg CF FIMFnn $L0X $X if T, a(cid) 
    mat F[3,3]=e(r2_a)
  
** Table A7 **
estout r6*, drop(_*) starlevels(° .1 * .05 ** .01 *** .001) cells((b(star fmt(3)) se(par fmt(3)))) stats(N r2_w, fmt(0 3)) 
mat li F 
 
  
* IV design: China swaps 
  
  egen pSwap=mean(swap), by(iso3)
  g ivCR0=pSwap*lnres_chn
  mat F=J(3,3,0)
  qui cmp (CF=l.swap_ever $X _Icid*) (IV: l.swap_ever=ivCR0 lnres_chn pSwap $X _Icid*), indicators(T 1) ro cl(cid) iterate(30)
    est store r71
    mat F[1,1]=e(N1)
    qui test [IV]ivCR0
    mat F[2,1]=r(chi2)
    qui areg CF l.swap_ever $X if T, a(cid) 
    mat F[3,1]=e(r2_a)
  qui cmp (CF=l.swap_ever $L0 $X _Icid*) (IV: l.swap_ever=ivCR0 lnres_chn pSwap $L0 $X _Icid*), indicators(T 1) ro cl(cid) iterate(30)
    est store r72
    mat F[1,2]=e(N1)
    qui test [IV]ivCR0
    mat F[2,2]=r(chi2)
    qui areg CF l.swap_ever $L0 $X if T, a(cid) 
    mat F[3,2]=e(r2_a)
  qui cmp (CF=l.swap_ever $L0X $X _Icid*) (IV: l.swap_ever=ivCR0 lnres_chn pSwap $L0X $X _Icid*), indicators(T 1) ro cl(cid) iterate(30)
    est store r73
	mat F[1,3]=e(N1)
    qui test [IV]ivCR0
    mat F[2,3]=r(chi2)
    qui areg CF l.swap_ever $L0X $X if T, a(cid) 
    mat F[3,3]=e(r2_a)
  
** Table A8 **
estout r7*, drop(_*) starlevels(° .1 * .05 ** .01 *** .001) cells((b(star fmt(3)) se(par fmt(3)))) stats(N r2_w, fmt(0 3)) 
mat li F 
  
  
* Placebo test with US Fed swaps 

  qui areg CF l.FEDSwap if T, a(cid) cl(cid)
  est store r81
  qui areg CF l.FEDSwap $X $L0 if T, a(cid) cl(cid)
  est store r82
  qui areg CF l.FEDSwap $X $L0X if T, a(cid) cl(cid)
  est store r83
  
** Table A9 **
estout r8*, drop(_* ) starlevels(° .1 * .05 ** .01 *** .001) cells((b(star fmt(3)) se(par fmt(3)))) stats(N N_clust r2_a, fmt(0 0 3)) 


* IMF program with CBI conditions

  g CBI=cbi0>0
  g imfstrict1=(IMFnn==1 & CBI>0)
  g imfstrict0=(IMFnn==1 & CBI<=0)
    
  qui areg CF F.imfstrict1 F.imfstrict0 if T, a(cid) cl(cid)
  est store r91
  qui areg CF F.imfstrict1 F.imfstrict0 $X $L0 if T, a(cid) cl(cid)
  est store r92
  qui areg CF F.imfstrict1 F.imfstrict0 $X $L0X if T, a(cid) cl(cid)
  est store r93
  
** Table A10 **  
estout r9*, drop(_* ) starlevels(° .1 * .05 ** .01 *** .001) cells((b(star fmt(3)) se(par fmt(3)))) stats(N N_clust r2_a, fmt(0 0 3)) 
   
  
* Split-sample by women on CB board
  
  qui areg CF l.swap_ever FIMFnn $X if T==1 & femaleshare>0, a(cid) cl(cid)
  est store s11
  qui areg CF l.swap_ever FIMFnn $X $L1X if T==1 & femaleshare>0, a(cid) cl(cid)
  est store s12
  qui areg CF l.swap_ever FIMFnn $X if T==1 & femaleshare==0, a(cid) cl(cid)
  est store s13
  qui areg CF l.swap_ever FIMFnn $X $L1X if T==1 & femaleshare==0, a(cid) cl(cid)
  est store s14
  
** Table A11 **
estout s1*, drop(_* ) starlevels(° .1 * .05 ** .01 *** .001) cells((b(star fmt(3)) se(par fmt(3)))) stats(N N_clust r2_a, fmt(0 0 3)) 


* Further scope conditions

  qui areg CF l.swap_ever##cl.soe1 FIMFnn##cl.soe1 $X if T==1, a(cid) cl(cid)
  est store s21
  qui areg CF l.swap_ever##cl.ka FIMFnn##cl.ka $X if T==1, a(cid) cl(cid)
  est store s22
  qui areg CF l.swap_ever##coupi FIMFnn##coupi $X if T==1, a(cid) cl(cid)
  est store s23
  
** Table A12 **  
estout s2*, drop(_* *0* *oL*) starlevels(° .1 * .05 ** .01 *** .001) cells((b(star fmt(3)) se(par fmt(3)))) stats(N N_clust r2_a, fmt(0 0 3)) 
  

  
* Quarterly data
******************************************************************************

  use "CNAML_replication_QLY", clear 
  
  encode iso3, g(ccode)
  egen ct=group(ccode time)
  qui xi:reg IMFprog i.year
  
  xtset ccode time
  
  global A l4.lngdppc l4.dlncpi l4.reserves_WDI l4.crisis_LV 
  global B $A l4.chga l4.coupi l4.s_unga3g7 l4.lnref
  
 
* Regression results
********************

* IMF-only result

  qui reghdfe cf f(0/4).IMFprogMis lnliabs0, a(ccode time) cl(ccode) 
  est store q11
  qui reghdfe cf f(0/4).IMFprogMis lnliabs0 $A, a(ccode time) cl(ccode) 
  est store q12
  qui reghdfe cf f(0/4).IMFprogMis lnliabs0 $B, a(ccode time) cl(ccode) 
  est store q13
  
** Table 6 **
estout q1*, drop(_*) starlevels(° .1 * .05 ** .01 *** .001) cells((b(star fmt(3)) se(par fmt(3)))) stats(N N_clust r2_a, fmt(0 0 3))  


* Distinguishing timing of swaps 

  qui reghdfe cf l(0/4).SwapDrawn l(0/4).SwapAgreed lnliabs0, a(ccode time) cl(ccode) 
  est store q21
  qui reghdfe cf l(0/4).SwapDrawn l(0/4).SwapAgreed lnliabs0 $A, a(ccode time) cl(ccode) 
  est store q22
  qui reghdfe cf l(0/4).SwapDrawn l(0/4).SwapAgreed lnliabs0 $B, a(ccode time) cl(ccode) 
  est store q23
  
** Table 7 **
estout q2*, drop(_*) starlevels(° .1 * .05 ** .01 *** .001) cells((b(star fmt(3)) se(par fmt(3)))) stats(N N_clust r2_a, fmt(0 0 3))  
 

* Robustness tests
******************

* IMF-only result with full DL(4,4)

  qui reghdfe cf l(0/4).IMFprogMis f(1/4).IMFprogMis lnliabs0, a(ccode time) cl(ccode) 
  est store p11
  qui reghdfe cf l(0/4).IMFprogMis f(1/4).IMFprogMis lnliabs0 $A, a(ccode time) cl(ccode) 
  est store p12
  qui reghdfe cf l(0/4).IMFprogMis f(1/4).IMFprogMis lnliabs0 $B, a(ccode time) cl(ccode) 
  est store p13
  
** Table A14 **
estout p1*, drop(_*) starlevels(° .1 * .05 ** .01 *** .001) cells((b(star fmt(3)) se(par fmt(3)))) stats(N N_clust r2_a, fmt(0 0 3))  


* Swap-only result

  qui reghdfe cf l(0/4).SwapDrawn f(1/4).SwapDrawn lnliabs0, a(ccode time) cl(ccode) 
  est store p21
  qui reghdfe cf l(0/4).SwapDrawn f(1/4).SwapDrawn lnliabs0 $A, a(ccode time) cl(ccode) 
  est store p22
  qui reghdfe cf l(0/4).SwapDrawn f(1/4).SwapDrawn lnliabs0 $B, a(ccode time) cl(ccode) 
  est store p23
  
** Table A15 **   
estout p2*, drop(_*) starlevels(° .1 * .05 ** .01 *** .001) cells((b(star fmt(3)) se(par fmt(3)))) stats(N N_clust r2_a, fmt(0 0 3))  

 
* Full DL(4,4) for swaps

  qui reghdfe cf l(0/4).SwapDrawn f(1/4).SwapDrawn l(0/4).SwapAgreed f(1/4).SwapAgreed lnliabs0, a(ccode time) cl(ccode) 
  est store p31
  qui reghdfe cf l(0/4).SwapDrawn f(1/4).SwapDrawn l(0/4).SwapAgreed f(1/4).SwapAgreed lnliabs0 $A, a(ccode time) cl(ccode) 
  est store p32
  qui reghdfe cf l(0/4).SwapDrawn f(1/4).SwapDrawn l(0/4).SwapAgreed f(1/4).SwapAgreed lnliabs0 $B, a(ccode time) cl(ccode) 
  est store p33
  
** Table A16 **   
estout p3*, drop(_*) starlevels(° .1 * .05 ** .01 *** .001) cells((b(star fmt(3)) se(par fmt(3)))) stats(N N_clust r2_a, fmt(0 0 3))  


* Everything in the model

  qui reghdfe cf l(0/4).IMFprogMis f(1/4).IMFprogMis l(0/4).SwapDrawn f(1/4).SwapDrawn l(0/4).SwapAgreed f(1/4).SwapAgreed lnliabs0, a(ccode time) cl(ccode) 
  est store p41
  qui reghdfe cf l(0/4).IMFprogMis f(1/4).IMFprogMis l(0/4).SwapDrawn f(1/4).SwapDrawn l(0/4).SwapAgreed f(1/4).SwapAgreed lnliabs0 $A, a(ccode time) cl(ccode) 
  est store p42
  qui reghdfe cf l(0/4).IMFprogMis f(1/4).IMFprogMis l(0/4).SwapDrawn f(1/4).SwapDrawn l(0/4).SwapAgreed f(1/4).SwapAgreed lnliabs0 $B, a(ccode time) cl(ccode) 
  est store p43
  
** Table A17  
estout p4*, drop(_*) starlevels(° .1 * .05 ** .01 *** .001) cells((b(star fmt(3)) se(par fmt(3)))) stats(N N_clust r2_a, fmt(0 0 3))  


 * Exclude HICs

  g hicwb=lngdppc>9.547
  qui reghdfe cf l(0/4).SwapDrawn f(0/4).IMFprogMis if hicwb==0, a(ccode time) cl(ccode)  
  est store p51
  qui reghdfe cf l(0/4).SwapDrawn f(0/4).IMFprogMis $A if hicwb==0, a(ccode time) cl(ccode)  
  est store p52
  qui reghdfe cf l(0/4).SwapDrawn f(0/4).IMFprogMis $B if hicwb==0, a(ccode time) cl(ccode)  
  est store p53
  
** Table A18 **
estout p5*, drop(_*) starlevels(° .1 * .05 ** .01 *** .001) cells((b(star fmt(3)) se(par fmt(3)))) stats(N N_clust r2_a, fmt(0 0 3))
    

* Controls at different time points

  global A1 l.lngdppc l.dlncpi l.reserves_WDI l.crisis_LV
  global B1 $A1 l.chga l.coupi l.s_unga3g7 l.lnref 

  qui reghdfe cf l(0/4).SwapDrawn f(0/4).IMFprogMis, a(ccode time) cl(ccode)  
  est store p61
  qui reghdfe cf l(0/4).SwapDrawn f(0/4).IMFprogMis $A $A1, a(ccode time) cl(ccode)  
  est store p62
  qui reghdfe cf l(0/4).SwapDrawn f(0/4).IMFprogMis $B $B1, a(ccode time) cl(ccode)  
  est store p63
  
** Table A19 **
estout p6*, drop(_*) starlevels(° .1 * .05 ** .01 *** .001) cells((b(star fmt(3)) se(par fmt(3)))) stats(N N_clust r2_a, fmt(0 0 3))
      
	  
* OFDs do not predict crisis

  global Awo l4.lngdppc l4.dlncpi l4.reserves_WDI 
  global Bwo $Awo l4.chga l4.coupi l4.s_unga3g7 l4.lnref
  
  qui reghdfe crisis_LV l(0/4).cf, a(ccode time) cl(ccode)  
  est store p71
  qui reghdfe crisis_LV l(0/4).cf $Awo, a(ccode time) cl(ccode)  
  est store p72
  qui reghdfe crisis_LV l(0/4).cf $Bwo, a(ccode time) cl(ccode)  
  est store p73
  
** Table A20 **
estout p7*, drop(_*) starlevels(° .1 * .05 ** .01 *** .001) cells((b(star fmt(3)) se(par fmt(3)))) stats(N N_clust r2_a, fmt(0 0 3))
    

* GFTEI membership - split sample

  qui reghdfe cf f3.IMFprogMis l3.SwapDrawn lnliabs0 if gf_join==0, a(ccode time) cl(ccode)
  est store p81
  qui reghdfe cf f3.IMFprogMis l3.SwapDrawn lnliabs0 $A if gf_join==0, a(ccode time) cl(ccode)
  est store p82
  qui reghdfe cf f3.IMFprogMis l3.SwapDrawn lnliabs0 $B if gf_join==0, a(ccode time) cl(ccode)
  est store p83
  qui reghdfe cf f3.IMFprogMis l3.SwapDrawn lnliabs0 if gf_join==1, a(ccode time) cl(ccode)
  est store p84
  qui reghdfe cf f3.IMFprogMis l3.SwapDrawn lnliabs0 $A if gf_join==1, a(ccode time) cl(ccode)
  est store p85
  qui reghdfe cf f3.IMFprogMis l3.SwapDrawn lnliabs0 $B if gf_join==1, a(ccode time) cl(ccode)
  est store p86
  
** Table A21 **
estout p8*, drop(_*) starlevels(° .1 * .05 ** .01 *** .001) cells((b(star fmt(3)) se(par fmt(3)))) stats(N N_clust r2_a, fmt(0 0 3))  
	  
  
* Different defintions  

  qui reghdfe cfc f3.IMFprogMis l3.SwapDrawn l3.SwapAgreed lnliabs0, a(ccode time) cl(ccode)
  est store p91
  qui reghdfe cf_DAM f3.IMFprogMis l3.SwapDrawn l3.SwapAgreed lnliabs0, a(ccode time) cl(ccode)
  est store p92
  qui reghdfe cf_AND f3.IMFprogMis l3.SwapDrawn l3.SwapAgreed lnliabs0, a(ccode time) cl(ccode)
  est store p93
  qui reghdfe cf_GB_sink f3.IMFprogMis l3.SwapDrawn l3.SwapAgreed lnliabs0, a(ccode time) cl(ccode)
  est store p94
  qui reghdfe cfus f3.IMFprogMis l3.SwapDrawn l3.SwapAgreed lnliabs0, a(ccode time) cl(ccode)
  est store p95
   
** Table A22 **
estout p9*, drop(_*) starlevels(° .1 * .05 ** .01 *** .001) cells((b(star fmt(3)) se(par fmt(3)))) stats(N N_clust r2_a, fmt(0 0 3))  
